package com.cyzy.controller;

import com.cyzy.dao.ClassTeacherDao;
import com.cyzy.dto.Result;
import com.cyzy.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/teacher")
public class TeacherController {

    @Autowired
    private TeacherService teacherService;

    @GetMapping("/showTeacher")
    public Result showTeacher(ClassTeacherDao classTeacherDao){
        ClassTeacherDao showTeacher = teacherService.showTeacher(classTeacherDao);
        return Result.ok().data("showTeacher", showTeacher);
    }
}
